package com.ki.erp.constant;

import java.util.HashMap;
import java.util.Map;

public class MongoStaticQueryConstant {
    public static final Map<String, String> QUERY_LANGUAGE = new HashMap<>();
    public static final Map<String, String> QUERY_DATABASE = new HashMap<>();
    public static final Map<String, String> QUERY_COLLECTION = new HashMap<>();
    public static final String INSURANCE_ON_SALE = """
            [
              {
                "$match": {
                  "service.name": "保险部",
                  "service._id": "4c255654-b322-4a3d-ac59-b34d6574b1c8",
                  "status": "ON"
                }
              },
              {
                "$unwind": {
                  "path": "$bvList",
                  "preserveNullAndEmptyArrays": false
                }
              },
              {
                "$project": {
                  "_id": 0,
                  "名字": "$name",
                  "bvFactor": "$bvList.bvFactors",
                  "选项": "$bvList.name"
                }
              }
            ]
            """;


    static {
        QUERY_LANGUAGE.put("INSURANCE_ON_SALE", INSURANCE_ON_SALE);
        QUERY_DATABASE.put("INSURANCE_ON_SALE", "orderTemplate");
        QUERY_COLLECTION.put("INSURANCE_ON_SALE", "product");
    }
}
